package pl.com.like.sequoia.model.bio;

import pl.com.like.sequoia.model.Pojo;
import pl.com.like.sequoia.model.bio.enums.PdbDefEnum;

public class BioParam extends Pojo<Long> {

	private static final long serialVersionUID = 4381041559134546791L;
	private PdbDefEnum key;
	private String value;
	private Long parentId;

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BioParam other = (BioParam) obj;
		if (key == null) {
			if (other.key != null)
				return false;
		} else if (!key.equals(other.key))
			return false;
		if (value == null) {
			if (other.value != null)
				return false;
		} else if (!value.equals(other.value))
			return false;
		return true;
	}

	@Override
	public Long getId() {
		return id;
	}

	public PdbDefEnum getKey() {
		return key;
	}

	public Long getParentId() {
		return parentId;
	}

	public String getValue() {
		return value;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((key == null) ? 0 : key.hashCode());
		result = prime * result + ((value == null) ? 0 : value.hashCode());
		return result;
	}

	public void setKey(PdbDefEnum key) {
		this.key = key;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public void setValue(String value) {
		this.value = value;
	}

}
